package com.stqf.scala.grammar.basic

import scala.collection.Iterator
import scala.io.Source

/**
  * Created by ASUS on 2018-01-31.
  */
object LocalFunction {
  def main(args: Array[String]): Unit = {
    val basicPath = System.getProperty("user.dir") + "\\src\\com\\stqf\\scala_grammar\\basic"
    val path = basicPath + "\\NullLearn.scala"
    val file = Source.fromFile(path)
    print(file.getLines())
    file.close
    def print(temp: Iterator[String]): Unit = {
      while (temp.hasNext) {
        val str = temp.next()
        printf("%2d  %s%n", str.length, str)
      }
    }
  }

}
